package com.xbongbong.pro.statistic.enums;

/**
 * 报表限制相关枚举
 *
 * @author 梁鲁江
 * @version v1.0
 * @date 2019/1/17 8:53
 * @since v1.0
 */
public enum ChartLimitEnum {
    /**
     * 报表限制
     */
    CHART_LIMIT_NUM(1, 10, "enum.chartLimit.msg.chart_limit_num"),
//    CHART_GROUP_NUM(2, 100, "分组数量不能超过100个"),
    CHART_FILTER_NUM(3, 15, "enum.chartLimit.msg.chart_filter_num"),
    CHART_SEARCH_NUM(4, 15, "enum.chartLimit.msg.chart_search_num"),
    DATA_SOURCE_NUM(5, 3, "enum.chartLimit.msg.data_source_num"),
    SLAVE_SOURCE_NUM(6, 5, "enum.chartLimit.msg.slave_source_num"),
    DISPLAY_SOURCE_NUM(7, 50, "enum.chartLimit.msg.display_source_num"),
    SUMMARY_SOURCE_NUM(8, 4, "enum.chartLimit.msg.summary_source_num"),
    GROUP_SOURCE_NUM(9, 3, "enum.chartLimit.msg.group_source_num"),
    CHART_CLASSIFY_NUM(10, 1, "enum.chartLimit.msg.chart_classify_num"),
    CHART_SERIES_NUM(11, 1, "enum.chartLimit.msg.chart_series_num"),
    CHART_VALUE_NUM(12, 1, "enum.chartLimit.msg.chart_value_num"),
    DRIVER_SOURCE_NUM(13, 1, "enum.chartLimit.msg.driver_source_num"),
    DATA_SOURCE_FORMART(14, 1, "enum.chartLimit.msg.data_source__formart"),

    CHART_FAVORITE_MAX(15, 10, "enum.chartLimit.msg.chart_favorite_max"),
    ;


    /**
     * 枚举值
     */
    private final int code;
    /**
     * 数量限制
     */
    private final int limit;
    /**
     * 错误信息--中文描述
     */
    private final String msg;

    /**
     * 构造一个<code>ChartLimitEnum</code>枚举对象
     *
     * @param code  错误码
     * @param limit 数量限制
     * @param msg   中文描述
     */
    ChartLimitEnum(int code, int limit, String msg) {
        this.code = code;
        this.limit = limit;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public int getLimit() {
        return limit;
    }

    public String getMsg() {
        return msg;
    }
}
